package com.xmhmyh.generalframework.framework.redisQueue;
import com.xmhmyh.generalframework.framework.redis.IredisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
 * redis生产者
 */
@Component
public class RedisQueueProducer {
    @Autowired
    IredisService redisService;
    /**
     * 发送消息
     *
     * @param queueName    队列名称
     * @param redisQueueMessage 消息
     */
    public void sendMessage(String queueName, RedisQueueMessage redisQueueMessage) {
        redisService.lPush(queueName, redisQueueMessage);
    }

}
